import java.util.Scanner;

public class FirstQuestion {


    public void Calculator(int num1,int num2,int num3){
        switch (num3){
            case 1:
                System.out.println("加法："+(num1+num2));
                break;
            case 2:
                System.out.println("减法:"+(num1-num2));
                break;
            case 3:
                System.out.println("乘法:"+(num1*num2));
                break;
            case 4:
                if (num2==0){
                    System.out.println("除数不能为0");
                }else {
                    System.out.println("除法:"+(num1/num2));
                }
                break;
            default:
                break;
        }
    }

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入第一个整数:");
        int num1=input.nextInt();
        System.out.println("请输入第二个整数:");
        int num2=input.nextInt();
        System.out.println("1.加,2.减,3.乘,4.除");
        System.out.println("请选择:");
        int num3=input.nextInt();
        FirstQuestion firstQuestion=new FirstQuestion();
        firstQuestion.Calculator(num1,num2,num3);

    }
}
